<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    h1{
      color: rgb(255,0,0);
    }
    #d1{
      background-color: cornflowerblue;
      width: 500px;
      height:300px;
      background-image: url("../a.jpg");
      background-size: 500px 300px;
      /*禁止重复*/
      background-repeat: no-repeat;
      /*控制背景图片位置 */
      background-position: 50%,50%;
    }
    #d2{
      margin-top: 10px;
      background-color: #f5f5f5;
      width: 611px;
      height: 376px;
      background-image: url("http://doc.canglaoshi.org/tstore_v1/images/itemCat/study_computer_img1.png");
      background-repeat: no-repeat;
      background-size: 318px,319px;
      background-position:90%,80% ;
    }
  </style>
</head>
<body>
<div id="d1"></div>
<div id="d2">

</div>
<h1>颜色测试</h1>
</body>
</html>